﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <script src="../jq/jquery-1.8.0.min.js"></script>
    <script src="AjaxSelect.js"></script>
</head>
<body>
    <select id="s1"></select>
    <input type="button" id="b1" value ="bbb" />
</body>
</html>
<script type="text/javascript">
    var s = new select($("#s1"));

    var data = "a,b,c|1,2,3";

    s.Append(data);

    $("#b1").click(function () {
        var msg = "index:" + s.GetSelectIndex() + "--value:" + s.GetSelectVal() + "--text:" + s.GetSelectText();

        alert(msg);
    })
</script>